Skip to content

Add AI redshirting endpoint#29

Merged
CalebRose merged 4 commits into
masterfrom
AI_Redshirts
Mar 25, 2026
Merged

Add AI redshirting endpoint#29
CalebRose merged 4 commits into
masterfrom
AI_Redshirts

Conversation

@jedibob5

Copy link
Copy Markdown
Collaborator

Adds an admin endpoint, intended to be run just prior to the redshirt deadline, that assigns redshirts for AI-controlled teams. It will redshirt the top 20 redshirt-eligible players by OVR on each AI team that have either A) not had any snaps in the first few weeks of the season or B) sustained a long-term injury in that time frame. This should help improve the AI's frankly rather terrible roster management, and set up AI teams to be in a somewhat more advantageous position should a user take them over.

I'm considering changing the injury threshold to 8 weeks - even though such a player would usually be able to eventually return to action for the last game or two of that regular season, an injury of that severity that early in the year tends to be a bit of a lost season anyway, I think. Looking for some feedback on that.

I performed a test run of the endpoint locally with the call to SetRedshirtStatusForPlayer commented out, and saved the results. I've confirmed that user-controlled teams are being skipped, no healthy players with games played were being marked for redshirting, and found one instance of a player with a 10-week injury that was marked.
RedshirtTest.txt

@CalebRose CalebRose left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sync logic looks good. I think my only concern would be to check for the team's depth at position.

This algorithm will likely target players that haven't played a game, which is the primary intention of why an AI team should redshirt a player.

With that said, I think we should check to make sure that a team doesn't become too shallow at a position because of the redshirting of a player.

Just my two cents. I appreciate the work you're doing with this, thank you.

@jedibob5

Copy link
Copy Markdown
Collaborator Author

Logs from a second round of testing with the position minimum tracking.
RedshirtTest2.txt

@CalebRose
CalebRose merged commit fa13e9b into master Mar 25, 2026
1 check passed
@CalebRose
CalebRose deleted the AI_Redshirts branch March 25, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants